<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/27 0027
  Time: 11:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户登录</title>

</head>
<body>
<%

    Cookie[] cookies = request.getCookies();
    String value = "";
    if (cookies!=null&&cookies.length>0){
        for (Cookie cookie:cookies) {
            if(cookie.getName().equals("username")) {
                value = cookie.getValue();
            }
        }
    pageContext.setAttribute("uname",value);
    }
%>
<form action="success" method="post">
    账号:<input name="username" value="${uname}">
    <br/>
    密码:<input type="password" name="password">  <br/>
    <input type="submit" value="提交">
</form>
</body>
</html>
